<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Render Tags</title>
    </head>
    <body>
        <script src="../dist/vue-2.6.14.js"></script>

        <div id="app">
            <example :tags="['h1', 'h2', 'h3']"></example>
        </div>

        <script>
            Vue.component('example', {
                render(h) {
                    console.log(this.tags);
                    return h(
                        'div',
                        this.tags.map((item, idx) => {
                            return h(item, idx + '');
                        })
                    );
                },

                props: {
                    tags: {
                        type: Array,
                        required: true,
                    },
                },
            });

            new Vue({ el: '#app' });
        </script>
    </body>
</html>
